<style scoped>
	i{font-style: normal}
	.top_jl{display: -webkit-box;display: -webkit-flex; display: flex; background: #E64340; color: #fff; padding:12px;}
	.top_jl span{-webkit-box-flex: 1; -webkit-flex: 1;flex: 1; text-align: center;}
	.top_jl span:first-child{border-right:.5px solid #fff;}
	.top_jl span p{ font-size: 12px;}
	.top_jl span i{ font-size: 18px; font-family: Arial;}

	.money_box{background: #fff;}
	.money_item{ padding:8px; margin:0 1px; border-bottom: 1px solid #f0f0f0; position: relative;}
	.money_item span{ position: absolute; right: 8px; top: 50%; margin-top:-2px; line-height: 4px; height: 4px; font-size: 18px;}
	.money_item p{ line-height: 17px;font-size: 12px;}
	.money_item i{ font-size: 12px;}
	.money_item span.jia{ color: #FF0000}
	.money_item span.jian{ color: #2BB050}
</style>


<template>
	<div v-loading="loading">

		<div class="top_jl">
			<span>
				<p>可用返现金额</p>
				<i>{{form.jieyu}}</i>
			</span>
			<span>
				<p>累计返现金额</p>
				<i>{{form.leiji}}</i>
			</span>
		</div>
		<div class="money_box">
			<div class="money_item" v-for="item in form.info" :key="item.id">
        <p v-if="item.remark">{{item.remark}}</p>
        <p v-else style="color:#666;">暂无备注信息</p>
				<i>{{item.created_at}}</i>
				<span class="jian" v-if="item.pay > 0">+{{item.pay}} 元</span>
				<span class="jia" v-else>{{item.pay}} 元</span>
			</div>
		</div>
    <back></back>
	</div>
</template>

<script>
  import back from '@/components/back/backPrev';
	export default {
		directives: {

		},
		components:{
      back
		},
		data(){
			return {
				form : {},
				loading : false
			}
		},
		methods : {

			initdata(){
				this.loading = true;
				this.$http.member.get('fanxian/newVipFanxian').then(res => {
					if(!res.data.code){
						this.form = res.data.data;
					}
					this.loading = false;
				})
          .catch(err => {
            console.log(err)
            this.$message({
              message: '登陆过期，请重新登陆！',
              type: 'error'
            });
            localStorage.removeItem('user');
            localStorage.removeItem('company');
            localStorage.removeItem('api_token');
            localStorage.removeItem('refresh_token');
            location.reload()
          })
			}
		},
		computed : {
		},
		created(){
			this.initdata();
		},
		watch : {

		}
	}
</script>
